package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

/**
 * Description:
 * User: 故我
 * Date: 2023-11-05
 * Time: 14:41
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/getnumber")
    public Integer getnum(){
        return new Random().nextInt(100);
    }

    @RequestMapping("/getString")
    public String getstring(){
        return "getUser String!!";
    }

//    @RequestMapping("/login")
//    public String login(){
//        Object object = null;
//        object.hashCode();
//        return "hi tc";
//    }

    @RequestMapping("/register")
    public String reg(){
        int a = 10 /0;
        return "hi th";
    }
}
